$(function(e) {
// $(".open_pop").hide();
$(".click_pop").click(function(){
$(".open_pop").slideDown();
})
$(".close_pop").click(function(){
$(".open_pop").slideUp();
})
});
$(function(e) {
// $('a[href^="#"]').on('click', function(event) {
// var target = $(this.getAttribute('href'));
// if( target.length ) {
// event.preventDefault();
// $('html, body').stop().animate({
// scrollTop: target.offset().top
// }, 1000);
// }
// });
// Get the height of the header
var headerHeight = $(".cd-main-header").height();
// Attach the click event
$('a[href*=#]').bind("click", function(e) {
e.preventDefault();
var target = $(this).attr("href"); //Get the target
var scrollToPosition = $(target).offset().top - headerHeight;
$('html').animate({ 'scrollTop': scrollToPosition }, 600, function(){
window.location.hash = "" + target;
// This hash change will jump the page to the top of the div with the same id
// so we need to force the page to back to the end of the animation
$('html').animate({ 'scrollTop': scrollToPosition }, 0);
});
//$('body').append("called");
});
if($(window).width() < 1030){}
});
$(function(){
$('.blog_slider').slick({
dots: true,
dotsClass: 'banner-dots',
customPaging: function(slider, i) {
return '' + (i + 1) + '';
},
autoplay: false,
arrows: false,
prevArrow: 'Previous',
nextArrow: 'Next',
infinite: true,
speed:500,
fade: false,
cssEase: 'linear',
pauseOnHover: false,
autoplaySpeed:5000,
slidesToShow: 3,
slidesToScroll: 1,
responsive: [{
breakpoint: 1024,
settings: {
slidesToShow: 2,
slidesToScroll: 1,
}
}, {
breakpoint: 640,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
}
}, {
breakpoint: 420,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
}
}]
});
//
// $( '.testimoniImgSlider' ).on('init reInit afterChange', function (event, slick, currentSlide, nextSlide) {
// $( '.testimoniImgSlider' ).css( 'visibility', 'visible' );
// var a= $(".testimoniImgSlider li.slick-current").index();
//
// $(".testimoniImgSlider li:lt("+(a+1)+")").addClass('alignLeft');
// $(".testimoniImgSlider li:gt("+a+")").removeClass('alignLeft');
//
//});//for loading smooth home banner
//
//$('.testimoniImgSlider').slick({
// dots: false,
// dotsClass: 'slider_dots2',
// customPaging: function(slider, i) {
// return '0' + (i + 1) + '';
// },
// autoplay: false,
// arrows: true,
// prevArrow: 'Previous',
// nextArrow: 'Next',
// speed:500,
// fade: false,
// cssEase: 'linear',
// centerPadding: '0px',
// pauseOnHover: false,
// slide: 'li',
// infinite: true,
// slidesToShow: 3,
// slidesToScroll: 1,
// centerMode: true,
// focusOnSelect: true,
// asNavFor: '.testimoniInfoSlider',
//
// responsive: [
// {
// breakpoint:650,
// settings: {
// slidesToShow:1,
// centerMode: false,
// focusOnSelect: false,
// }
// }
// ]
// });
//
// $('.testimoniInfoSlider').slick({
// dots: false,
// dotsClass: 'slider_dots2',
// customPaging: function(slider, i) {
// return '0' + (i + 1) + '';
// },
// autoplay: false,
// arrows: false,
// infinite: true,
// speed:500,
// fade: true,
// cssEase: 'linear',
// pauseOnHover: false,
// slide: 'li',
// //vertical:true
// asNavFor: '.testimoniImgSlider',
//
// });
$( '.testimoniImgSlider' ).on('init reInit afterChange', function (event, slick, currentSlide, nextSlide) {
$( '.testimoniImgSlider' ).css( 'visibility', 'visible' );
var a= $(".testimoniImgSlider li.slick-current").index();
$(".testimoniImgSlider li:lt("+(a+1)+")").addClass('alignLeft');
$(".testimoniImgSlider li:gt("+a+")").removeClass('alignLeft');
});//for loading smooth home banner
$('.testimoniImgSlider').slick({
dots: false,
dotsClass: 'slider_dots2',
customPaging: function(slider, i) {
return '0' + (i + 1) + '';
},
autoplay: false,
arrows: true,
prevArrow: 'Previous',
nextArrow: 'Next',
speed:500,
fade: false,
cssEase: 'linear',
centerPadding: '0px',
pauseOnHover: false,
slide: 'li',
infinite: true,
slidesToShow: 3,
slidesToScroll: 1,
centerMode: true,
asNavFor: '.testimoniInfoSlider',
responsive: [
{
breakpoint:650,
settings: {
slidesToShow:1,
slidesToScroll: 1,
centerMode: false,
focusOnSelect: false,
}
}
]
});
$('.testimoniInfoSlider').slick({
slidesToShow: 1,
slidesToScroll: 1,
asNavFor: '.testimoniImgSlider',
dots: false,
arrows: false,
centerMode: true,
focusOnSelect: true
});
});
$(function(e) {
$('.banner_slider').slick({
dots: false,
dotsClass: 'custom_paging',
customPaging: function (slider, i) {
//FYI just have a look at the object to find aviable information
//press f12 to access the console
//you could also debug or look in the source
console.log(slider);
return (i + 1) + '/' + slider.slideCount;
},
autoplay: false,
arrows: false,
prevArrow: 'Previous',
nextArrow: 'Next',
infinite: true,
speed:500,
fade: false,
cssEase: 'linear',
pauseOnHover: false,
autoplaySpeed:5000,
slidesToShow: 1,
slidesToScroll: 1,
});
$('.story_slider').slick({
dots: true,
dotsClass: 'story_paging',
autoplay: false,
arrows: false,
prevArrow: 'Previous',
nextArrow: 'Next',
infinite: true,
speed:500,
fade: false,
cssEase: 'linear',
pauseOnHover: false,
autoplaySpeed:5000,
slidesToShow: 1,
slidesToScroll: 1,
});
$('.slider-single').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
prevArrow: 'Previous',
nextArrow: 'Next',
fade: false,
adaptiveHeight: true,
infinite: false,
//useTransform: true,
//speed: 400,
//cssEase: 'cubic-bezier(0.77, 0, 0.18, 1)',
});
$('.slider-nav')
.on('init', function(event, slick) {
$('.slider-nav .slick-slide.slick-current').addClass('is-active');
})
.slick({
slidesToShow: 5,
slidesToScroll: 1,
dots: false,
prevArrow: 'Previous',
nextArrow: 'Next',
focusOnSelect: false,
infinite: false,
//responsive: [{
// breakpoint: 1024,
// settings: {
// slidesToShow: 5,
// slidesToScroll: 5,
// }
// }, {
// breakpoint: 640,
// settings: {
// slidesToShow: 4,
// slidesToScroll: 4,
// }
// }, {
// breakpoint: 420,
// settings: {
// slidesToShow: 3,
// slidesToScroll: 3,
// }
// }]
});
$('.slider-single').on('afterChange', function(event, slick, currentSlide) {
$('.slider-nav').slick('slickGoTo', currentSlide);
var currrentNavSlideElem = '.slider-nav .slick-slide[data-slick-index="' + currentSlide + '"]';
$('.slider-nav .slick-slide.is-active').removeClass('is-active');
$(currrentNavSlideElem).addClass('is-active');
});
$('.slider-nav').on('click', '.slick-slide', function(event) {
event.preventDefault();
var goToSingleSlide = $(this).data('slick-index');
$('.slider-single').slick('slickGoTo', goToSingleSlide);
});
$('.socail_slider').slick({
dots: false,
dotsClass: 'banner-dots',
customPaging: function(slider, i) {
return '' + (i + 1) + '';
},
autoplay: false,
arrows: true,
prevArrow: 'Previous',
nextArrow: 'Next',
infinite: true,
speed:500,
fade: false,
cssEase: 'linear',
pauseOnHover: false,
autoplaySpeed:5000,
slidesToShow: 3,
slidesToScroll: 1,
responsive: [{
breakpoint: 1024,
settings: {
slidesToShow: 2,
slidesToScroll: 1,
}
}, {
breakpoint: 640,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
}
}, {
breakpoint: 420,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
}
}]
});
$('.development_slider').slick({
dots: false,
autoplay: false,
arrows: true,
prevArrow: 'Previous',
nextArrow: 'Next',
infinite: true,
speed:500,
fade: false,
cssEase: 'linear',
pauseOnHover: false,
autoplaySpeed:5000,
slidesToShow: 1,
slidesToScroll: 1
});
//$(".right_half").css("display", "none");
$('.cross').click(function() {
var $slider = $('.quick-links');
$(".right_half").css("display", "block");
$slider.animate({
right: parseInt($slider.css('right'),10) == -108 ?
0 : -108
//top: parseInt($slider.css('top'),10) == 0 ?
//78 : 0,
});
//$(".myaccdiv").height($(window).height()-$('.what_exide_care').height());
});
$('.right_half').click(function() {
var $slider = $('.quick-links');
$(this).css("display", "none");
$slider.animate({
right: parseInt($slider.css('right'),10) == -108 ?
0 : -108
//top: parseInt($slider.css('top'),10) == 0 ?
//78 : 0,
});
//$(".myaccdiv").height($(window).height()-$('.what_exide_care').height());
});
});
//-->
$(function(){//
var cboxOptions99 = {
iframe:true,
width: '95%',
height: '95%',
maxWidth: '860px',
maxHeight: '418px',
rel:"colorboxImg",
className:'box8',
transition: "elastic"
}
$('.play_btn').colorbox(cboxOptions99);
$(window).resize(function(){
$.colorbox.resize({
width: window.innerWidth > parseInt(cboxOptions99.maxWidth) ? cboxOptions99.maxWidth : cboxOptions99.width,
height: window.innerHeight > parseInt(cboxOptions99.maxHeight) ? cboxOptions99.maxHeight : cboxOptions99.height
});
});
});
$(function() {
if($(window).width() < 1030){
//$('.accordion ul li:first-child').addClass('haActive');
$('.accordion ul li').click(function(){
$('.accordion ul li').removeClass('haActive');
$(this).addClass('haActive');
})
}
});
//$(function(e) {
//var heightW = $(".top_banner_parallax img").height()+80;
//if($(window).width()>1024){
//
//$('.parallax_bottom').css('margin-top', heightW + 'px');
//}
//
//});
(function($){
if($(window).width()>1080){
$(window).load(function(){
$("#ourworld_scroll").mCustomScrollbar({
theme:"minimal"
});
});
}
})(jQuery);